import { http } from "@/utils/http";

type Menu = {
  path: string;
  component: string;
  name: string;
  meta: Meta;
  children: Array<Menu>;
};
type Meta = {
  icon: string;
  title: string;
  frameSrc: string;
  showParent: boolean;
  rank: number;
  showLink: boolean;
};

export const getAsyncRoutes = () => {
  return http.request<Array<Menu>>("get", "/menu/getAsyncRoutes");
};
